<!--
 * @Author: 梁 卓
 * @Version: V1.0.0
 * @Date: 2024-02-12 15:41:15
 * @LastEditors: 梁 卓
 * @LastEditTime: 2024-02-12 16:06:48
 * @FilePath: map.vue
 * Copyright 2024 Marvin, All Rights Reserved. 
 * 2024-02-12 15:41:15
 * @Description: 
-->
<template>
  <div>
    <baidu-map
        class="map_view"
        :center="center"
        :zoom="zoom"
        @ready="handler"
      >
    
    </baidu-map>
  </div>
</template>

<script>
export default {
  // name: 'map',

  data() {
    return {
      center: { lng: 0, lat: 0 },
      zoom: 11,
    };
  },

  created() {
    this.lng = 118.613946;
    this.lat = 32.304906;
    this.zoom = 11;
  },

  methods: {
    handler({ BMap, map }) {
      // 默认地图中心
      (this.center.lng = 118.613946),
        (this.center.lat = 32.45424),
        (this.zoom = 11);
      // map.setMapStyleV2({ styleId: "dgglUlIDtVwsCZXdDdoUHCG0RGL6aclb" })
    },
  },
};
</script>

<style lang="scss" scoped>
.map_view {
  width: 100%;
  height: 100%;
}
</style>